package spring.j2024_11_14.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import spring.j2024_11_14.model.BookInfo;
import spring.j2024_11_14.srevice.BookService;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;

@RestController
@RequestMapping("/book")
public class BookController {
    @Autowired
    private BookService service ;
    @RequestMapping("/getList")
    public List<BookInfo> getList(){
        // 通过逻辑层拿到处理过的数据

        List<BookInfo> list = service.getBookInfos();
       return list ;
    }

}
